home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / mail / netmail_13.lha / NetMail / Drivers / MultiView.reader < prev    next >
Text File  |  1995-09-30  |  1KB  |  58 lines

  1. /*
  2. ** $VER: MultiView.reader 1.1 (30.9.95)
  3. ** Copyright (c) 1995 Riccardo Solmi
  4. **
  5. */
  6.  
  7. OPTIONS RESULTS
  8. OPTIONS FAILAT 21
  9.  
  10. cmd = 'SYS:Utilities/MultiView'
  11. IF ~EXISTS(cmd) THEN DO
  12.    cmd = GetVar('NetMail/MultiViewCmd')
  13.    IF cmd = 0 | ~EXISTS(cmd) THEN DO
  14.       ADDRESS COMMAND 'SetEnv NetMail/MultiViewCmd `Which "MultiView"`'
  15.       cmd = GetVar('NetMail/MultiViewCmd')
  16.       IF cmd = 0 THEN DO
  17.          ADDRESS COMMAND 'SetEnv NetMail/MultiViewCmd `RequestFile Title "Select MultiView command" Noicons`'
  18.          cmd = GetVar('NetMail/MultiViewCmd')
  19.          IF cmd = 0 | ~EXISTS(cmd) THEN RETURN 2
  20.          ADDRESS COMMAND 'Copy QUIET ENV:NetMail/MultiViewCmd ENVARC:NetMail/MultiViewCmd'
  21.       END
  22.    END
  23. END
  24.  
  25. SELECT
  26.    WHEN UPPER(ARG(1)) = 'READ' THEN DO
  27.       PARSE ARG , file, port
  28.  
  29.       port = 'MVREADER'
  30.       IF ~show('P', port) THEN DO
  31.          ADDRESS COMMAND
  32.          'Run >NIL: "'cmd'" "'file'"' 'PORTNAME' port
  33.          IF RC ~= 0 THEN RETURN 5
  34.       END
  35.       ELSE DO
  36.          ADDRESS VALUE port
  37.          'Open NAME "'file'"'
  38.       END
  39.    END
  40.    WHEN UPPER(ARG(1)) = 'CLEAR' THEN DO
  41.       PARSE ARG , port
  42.  
  43.       IF show('P', port) THEN DO
  44.          ADDRESS VALUE port
  45.          'Quit'
  46.       END
  47.    END
  48.    WHEN UPPER(ARG(1)) = 'CLOSE' THEN DO
  49.       PARSE ARG , port
  50.  
  51.       IF show('P', port) THEN DO
  52.          ADDRESS VALUE port
  53.          'Quit'
  54.       END
  55.    END
  56. END
  57. RETURN port
  58.